import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/*
 * @author zzr
 * @date: 2025/04/21  11:24
 * @description:
 */
public class IO6 {
    public static void main(String[] args) throws IOException {
        try (InputStream inputStream = new FileInputStream("./test.txt")) {
            while (true) {
                byte[] b = new byte[1024];
                int n = inputStream.read(b,0, b.length);
                if (-1 == n) {
                    break;
                }
                String s = new String(b,0, n);
                System.out.println(s);
            }
        }
    }
}
